package com.mdy.mq.sender.controller;

import com.mdy.mq.bean.Person;
import com.mdy.mq.sender.modle.MqConstant;
import com.mdy.mq.sender.service.MqSenderService;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mengdy
 */
@RestController
@RequestMapping("/mq/sender")

public class MqSenderController {


    @Autowired
    MqSenderService mqSenderService;

    @RequestMapping("/test/direct")
    public String pushXxxEvent(Integer time, Integer num){
        Person person = new Person("张三", 18);
        return mqSenderService.pushXxxEvent(person,time,num);
    }
}
